<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8"/>
    <title>Title</title>
    <script src="../../static/js/jquery-1.9.1.min.js"></script>
    <script src="../../static/js/jqPaginator.js"></script>
    <link rel="stylesheet" href="../../static/css/beyond.min.css"/>
    <link rel="stylesheet" href="../../static/css/bootstrap.min.css"/>
</head>
<body>
    <table class="table table-striped table-bordered table-hover" id="simpledatatable">
        <thead class="bordered-darkorange">
        <tr><th>#</th>
            <th>主题</th>
            <th>状态</th>
            <th>创建时间</th>
            <th style="text-align: center"><span class="glyphicon glyphicon-wrench" aria-hidden="true"></span> 操作</th>
        </tr></thead>
        <tbody id="fileList">
        <tr> 	<td>1</td>	<td><span title="食品安全问题调查问卷">食品安全问题调查问卷</span></td> 	<td>进行中</td>  <td>2018-2-22 13:56:56</td><td style="text-align: center">  <button onclick="return view('24')" class="btn btn-warning btn-xs delete"><i class="glyphicon glyphicon-search"></i> 下载  </button> 	</td> </tr>
        <tr> 	<td>2</td>	<td><span title="供热情况调查问卷">供热情况调查问卷</span></td> 	<td>进行中</td>  <td>2018-1-25 14:51:09</td><td style="text-align: center">  <button onclick="return view('23')" class="btn btn-warning btn-xs delete"><i class="glyphicon glyphicon-search"></i> 下载  </button> 	</td> </tr>
        <tr> 	<td>10</td>	<td><span title="富拉尔基政府网易用性改造问卷调查">富拉尔基政府网易用性改造问卷调查</span></td> 	<td>已完成</td>  <td>2017-2-13 15:35:15</td><td style="text-align: center">  <button onclick="return viewInfo('9')" class="btn btn-primary btn-xs delete"><i class="glyphicon glyphicon-search"></i> 下载  </button> 	</td> </tr>  </tbody>
    </table>
   <div id="pagination"></div>
    <div class="footer">
        <button type="button" class="btn btn-primary pull-right">上传</button>
    </div>

</body>
<script type="text/javascript">
    $(function(){
        $.get('/user/getAll',function (result) {
            var content = "";
            $(result).each(function (index,data) {
                console.log(data);
                content+="<tr><td>"+index+1+"</td><td><span title="+data.filename+">"+data.filename+"</span></td><td>已完成</td>  <td>2017-2-13 15:35:15</td><td style='text-align: center'>  <button  class='btn btn-primary btn-xs delete'><i class='glyphicon glyphicon-search'></i> 下载  </button></td> </tr>";
            })
            $("#fileList").append(content);
        })


        $.jqPaginator('#pagination', {
            totalPages: 100,
            visiblePages: 10,
            currentPage: 3,
            wrapper:'<ul class="pagination"></ul>',
            first: '<li class="first"><a href="javascript:void(0);">首页</a></li>',
            prev: '<li class="prev"><a href="javascript:void(0);">上一页</a></li>',
            next: '<li class="next"><a href="javascript:void(0);">下一页</a></li>',
            last: '<li class="last"><a href="javascript:void(0);">末页</a></li>',
            page: '<li class="page"><a href="javascript:void(0);">{{page}}</a></li>',
            onPageChange: function (num) {
                $('#p').text(num);
            }
        });
    });

</script>
</html>